/*
 * File:   main.cpp
 * Author: Thomas Trojer
 *
 * Created on 04. Juli 2010, 23:30
 */

#include <cstdlib>
#include <iostream>

#include "turtle/Turtle.h"
#include "turtle/RoutePlanner.h"

#include "Types.h"

using namespace std;

void test() {
    RoutePlanner rp;
    rp.rule("B -> not ($1 eq 5) : C(1)");
    rp.rule("B -> $1 eq 5 : C(2)B(1)");
    rp.rule("D -> $1 < $R : R");
    rp.rule("C -> C($1 add 1 mul (2 sub 1)");

    string nextMeal = "C(1)";
    Turtle t(rp);
    for(int i = 0; i < 3; i++) {
        nextMeal = t.feed(nextMeal);
        cout << "next meal: " << nextMeal << endl;
    }
}

int main(int argc, char** argv) {
    test();

    return 0;
}

